Available types
Standard IQK types
R4 variants (row-interleaved)
R4 types pack weights in an interleaved layout that improves CPU memory access patterns, giving better token-generation throughput on AVX2, Zen4, and ARM NEON.
To use R4 packing at runtime without requantizing, pass the
-rtr (--run-time-repack) flag. This repacks non-R4 tensors on load when an interleaved variant is available.
MXFP4
MXFP4, as used in gpt-oss models, is supported on Zen4, AVX2, ARM NEON, Metal, and CUDA.Quantizing a model
1
Prepare a BF16 GGUF
Start from a BF16 base model. Quantizing from a higher-precision source gives the best results.
2
Generate an imatrix (recommended)
See the imatrix guide for the full command. An imatrix is not required but strongly recommended for quants below
Q6_0.3
Run llama-quantize
Custom quantization mixes
Real models are not uniform — attention tensors, embedding layers, and FFN experts often benefit from different quantization levels. Use--custom-q to apply per-tensor rules via regular expressions:
IQ4_KS above) applies to all tensors not matched by any regex. Rules are evaluated in the order they are listed; the first match wins.
Dry run
Before running a full quantization, use--dry-run to preview which type each tensor will be assigned, without writing any output file:
Runtime repacking with -rtr
If you have a non-R4 model file but want R4 throughput on CPU, pass-rtr when starting the server or CLI: